{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "20d6aa89",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n",
      "277 ms ± 4.06 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n",
      "False\n",
      "299 ms ± 4.61 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
     ]
    }
   ],
   "source": [
    "import cv2 as cv\n",
    "import numpy as np\n",
    "\n",
    "cv.setUseOptimized(True)\n",
    "print(cv.useOptimized())\n",
    "\n",
    "img = np.ones((1500,1500,3), np.uint8)*255\n",
    "\n",
    "%timeit res = cv.medianBlur(img,49)\n",
    "\n",
    "cv.setUseOptimized(False)\n",
    "print(cv.useOptimized())\n",
    "\n",
    "%timeit res = cv.medianBlur(img,49)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7fd1a4ec",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5b861a9f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
